<?php /* Smarty version 2.6.14, created on 2011-02-28 19:55:31
         compiled from catcol.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'catcol.tpl', 38, false),)), $this); ?>
<?php 
$catbanner=1;
include "ad_get.php";
 ?>

<?php if ($this->_tpl_vars['categories']): ?>
	<table cellspacing="0" class="box">
	<tr>
		<th colspan="<?php echo $this->_tpl_vars['CAT_PER_ROW']; ?>
">
		<div style="float:left;margin-top:4px;"><?php if ($this->_tpl_vars['catname']):  echo $this->_tpl_vars['catname'];  else:  echo @LA_CATEGORIES;  endif; ?></div>
		<?php if ($this->_tpl_vars['options']): ?>
			<div style="float:right"> <form method="get"><select name="region" onchange="submit();"><option value="-1"><?php echo @LA_REGION_CHOOSE_FIRST; ?>
</option><?php echo $this->_tpl_vars['options']; ?>
</select></form></div>
		<?php endif; ?>
		</th>
	</tr>
	
	<tr>
	<?php $_from = $this->_tpl_vars['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['main'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['main']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['category']):
        $this->_foreach['main']['iteration']++;
?> 
		<?php if ($this->_tpl_vars['category']['IMAGE'] != "default.gif"): ?>
		<td width="<?php echo $this->_tpl_vars['TD_SIZE']; ?>
%" class="category_none" valign="top"><img src="catimages/<?php echo $this->_tpl_vars['category']['IMAGE']; ?>
" alt="" hspace="2" />
		<?php else: ?>
		<td width="<?php echo $this->_tpl_vars['TD_SIZE']; ?>
%" class="category" valign="top">
		<?php endif; ?>
		
		<?php echo $this->_tpl_vars['category']['URL']; ?>
<strong> <?php echo $this->_tpl_vars['category']['CATEGORYNAME']; ?>
 (<?php echo $this->_tpl_vars['category']['TOTAL_ADS']; ?>
)</strong></a><br />	
			
		 <?php if ($this->_tpl_vars['category']['SUBCATLIST']): ?>
	    	<?php $_from = $this->_tpl_vars['category']['SUBCATLIST']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sub'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['sub']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['sub']):
        $this->_foreach['sub']['iteration']++;
?> 
	    		<a href="<?php echo $this->_tpl_vars['sub']['CATLINK']; ?>
" title="<?php echo $this->_tpl_vars['sub']['CATNAME_FULL']; ?>
"><?php echo $this->_tpl_vars['sub']['CATNAME']; ?>
</a> 
	    		<small class="littleGray"><?php echo $this->_tpl_vars['sub']['NUM']; ?>
</small><?php if (! ($this->_foreach['sub']['iteration'] == $this->_foreach['sub']['total'])): ?>,<?php endif; ?>
	    	<?php endforeach; endif; unset($_from); ?>
	    <?php elseif ($this->_tpl_vars['category']['CATDESCRIPTION']): ?>
	    	<small><?php echo $this->_tpl_vars['category']['CATDESCRIPTION']; ?>
</small>
	    <?php endif; ?>
		</td>
		
		<?php if ($this->_tpl_vars['category']['BREAK'] && ! ($this->_foreach['main']['iteration'] == $this->_foreach['main']['total'])): ?>
			</tr><tr class="<?php echo smarty_function_cycle(array('values' => "alt,"), $this);?>
">
		<?php endif; ?>
		
		<?php if (($this->_foreach['main']['iteration'] == $this->_foreach['main']['total'])): ?>
			<?php if ($this->_tpl_vars['category']['REMAIN_TD'] > 0): ?>
				<td colspan="<?php echo $this->_tpl_vars['category']['REMAIN_TD']; ?>
"></td>
			<?php endif; ?>
		<?php endif; ?>
		
	<?php endforeach; endif; unset($_from); ?> 
	</tr>
	</table>
<?php endif; ?>